<?php



/**
 * Skeleton subclass for representing a row from the 'station' table.
 *
 * 
 *
 * You should add additional methods to this class to meet the
 * application requirements.  This class will only be generated as
 * long as it does not already exist in the output directory.
 *
 * @package    propel.generator.ise-php
 */
class Station extends BaseStation {

	// concatenated address
	public function getAddress() {
		return $this->getStreet().", ".$this->getPostcode()." ".$this->getCity()->getCityname();
	}
	
	// array of offered category names
	public function getOffered() {
		$offered = array();
		foreach ($this->getOfferss() as $category) {
			$offered[] = $category->getCatname();
		}
		return $offered;
	}
	
	// sorted associated array of day -> opening hours
	public function getHours() {
		$hours = Stationhours::dayOrder();
		foreach ($this->getStationhourss() as $hour) {
			$hours[$hour->getDay()] = $hour->timeAsString();
		}
		return $hours;
	}
} // Station
